using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Archiving
{
    /// <summary>
    /// <para>Disable Archiving</para>
    /// <para>Disables archiving on a geodatabase feature class, table, or feature dataset.</para>
    /// <para>禁用对地理数据库要素类、表或要素数据集的存档。</para>
    /// </summary>    
    [DisplayName("Disable Archiving")]
    public class DisableArchiving : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DisableArchiving()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_dataset">
        /// <para>Input Dataset</para>
        /// <para>The geodatabase feature class, table, or feature dataset for which archiving will be disabled.</para>
        /// <para>将禁用存档的地理数据库要素类、表或要素数据集。</para>
        /// </param>
        public DisableArchiving(object _in_dataset)
        {
            this._in_dataset = _in_dataset;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Disable Archiving";

        public override string CallName => "management.DisableArchiving";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_dataset, _preserve_history.GetGPValue(), _out_dataset];

        /// <summary>
        /// <para>Input Dataset</para>
        /// <para>The geodatabase feature class, table, or feature dataset for which archiving will be disabled.</para>
        /// <para>将禁用存档的地理数据库要素类、表或要素数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_dataset { get; set; }


        /// <summary>
        /// <para>Preserve History Table</para>
        /// <para><xdoc>
        ///   <para>Specifies whether records that are not from the current moment will be preserved. If the table or feature class is versioned, the history table will become available. For nonversioned data, a table or feature class will be created with an appended _h that contains the history information.
        ///   <bulletList>
        ///     <bullet_item>Checked—Records that are not from the current moment will be preserved. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Records that are not from the current moment will not be preserved; they will be deleted.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否保留不是当前时刻的记录。如果对表或要素类进行版本控制，则历史记录表将变为可用。对于非版本化数据，将创建一个表或要素类，并附加包含历史信息的_h。
        ///   <bulletList>
        ///     <bullet_item>选中 - 将保留非当前时刻的记录。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 不会保留非当前时刻的记录;它们将被删除。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Preserve History Table")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _preserve_history_value _preserve_history { get; set; } = _preserve_history_value._true;

        public enum _preserve_history_value
        {
            /// <summary>
            /// <para>PRESERVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PRESERVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DELETE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DELETE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Input Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_dataset { get; set; }


        public DisableArchiving SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}